import requests
import json


class WebApi:
    """
    用作测试数据库的Web API
    """
    @staticmethod
    def get_info_s(r, now_hour):
            info_s = "天干地支：%s%s%s%s,属相：%s,阴历时间：%s,具体时辰：%s,六壬月：%s,六壬天：%s,六壬日：%s," \
                     "月相：%s,物候：%s,节气：%s,三元九运：%s,日禄：%s,六爻：%s,七曜：%s,彭祖天干：%s,彭祖地支：%s,八字：%s," \
                     "纳音：%s,日宜：%s,日忌：%s,时宜：%s,时忌：%s,吉神：%s,凶神：%s,每日相冲生肖：%s,每日相冲方位：%s," \
                     "星宿：%s,星宿吉凶：%s,星宿歌曲：%s,阳贵神方位：%s,阴贵神方位：%s,喜神方位：%s,福神方位：%s,财神方位：%s," \
                     "月胎神：%s,今日胎神：%s,太岁方向：%s,十二值星：%s日,北斗九星-年份-九数：%s,北斗九星-年份-七色：%s,北斗九星-年份-五行属性：%s," \
                     "方位：%s,北斗九星：%s,北斗九星名称：%s,北斗九星-吉凶：%s,北斗九星-奇门：%s,北斗九星-八门：%s,北斗九星-八门吉凶：%s," \
                     "北斗九星-八门-奇门阴阳：%s,北斗九星-太乙名称：%s,北斗九星-太乙类型：%s,北斗九星-太乙九神歌诀：%s,北斗九星详解：%s" \
                     % \
                     (r[2], r[3], r[4], r[5], r[1], r[22], now_hour, r[18], r[19], r[20], r[31], r[32], r[33], r[37],
                      r[38], r[39], r[40], r[41], r[42], r[43], r[44], r[45], r[46], r[47], r[48], r[49], r[50], r[54],
                      r[55], r[58], r[59], r[60], r[62], r[64], r[66], r[68], r[70], r[71], r[72], r[78], r[79], r[80],
                      r[81], r[82], r[84], r[85], r[86], r[87], r[88], r[89], r[90], r[91], r[92], r[93], r[94], r[96]
                      )
            info_s = info_s.replace(" ", "").replace("\n", "").replace("，", ",").replace("。", ".").replace("：", ":")
            return info_s